package model;

import java.io.Serializable;
import javax.persistence.*;
import java.sql.Timestamp;
import java.util.List;


/**
 * The persistent class for the END_PT database table.
 * 
 */
@Entity
@Table(name="END_PT")
public class EndPt implements Serializable {
	private static final long serialVersionUID = 1L;

	@Id
	@Column(name="END_PT_ID")
	private long endPtId;

	@Column(name="EFF_TS")
	private Timestamp effTs;

	//bi-directional many-to-one association to EndPtScd
	@OneToMany(mappedBy="endPt", cascade={CascadeType.ALL})
	private List<EndPtScd> endPtScds;

	public EndPt() {
	}

	public long getEndPtId() {
		return this.endPtId;
	}

	public void setEndPtId(long endPtId) {
		this.endPtId = endPtId;
	}

	public Timestamp getEffTs() {
		return this.effTs;
	}

	public void setEffTs(Timestamp effTs) {
		this.effTs = effTs;
	}

	public List<EndPtScd> getEndPtScds() {
		return this.endPtScds;
	}

	public void setEndPtScds(List<EndPtScd> endPtScds) {
		this.endPtScds = endPtScds;
	}

	public EndPtScd addEndPtScd(EndPtScd endPtScd) {
		getEndPtScds().add(endPtScd);
		endPtScd.setEndPt(this);

		return endPtScd;
	}

	public EndPtScd removeEndPtScd(EndPtScd endPtScd) {
		getEndPtScds().remove(endPtScd);
		endPtScd.setEndPt(null);

		return endPtScd;
	}

}